#include "Config.h"
#include "Cfg.h"
#include "ConfigScript.h"
#include "wch/File.h"
#include "wch/StringTokenizer.h"
#include "Common/Atoi.h"
#include "Common/tinyxml.h"
#include "Server/ServerType.h"

using namespace wch;


Cfg cfg;

Cfg::Cfg()
: _tcpPort(0), _httpPort(0), _free(true)
{

}

bool Cfg::load( const std::string& file_ )
{
	_file = file_;
	ConfigScript script( this );
	script.doFile( _file.c_str() );
	return true;
}